home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / pvm34b3.zip / pvm34b3 / pvm3 / rm / srm.h < prev   
C/C++ Source or Header  |  1997-07-22  |  5KB  |  165 lines

  1.  
  2. /* $Id: srm.h,v 1.1 1997/07/15 17:59:19 pvmsrc Exp $ */
  3.  
  4. /*
  5.  *         PVM version 3.4:  Parallel Virtual Machine System
  6.  *               University of Tennessee, Knoxville TN.
  7.  *           Oak Ridge National Laboratory, Oak Ridge TN.
  8.  *                   Emory University, Atlanta GA.
  9.  *      Authors:  J. J. Dongarra, G. E. Fagg, M. Fischer
  10.  *          G. A. Geist, J. A. Kohl, K. S. London, R. J. Manchek,
  11.  *    P. Mucci, P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam
  12.  *                   (C) 1997 All Rights Reserved
  13.  *
  14.  *                              NOTICE
  15.  *
  16.  * Permission to use, copy, modify, and distribute this software and
  17.  * its documentation for any purpose and without fee is hereby granted
  18.  * provided that the above copyright notice appear in all copies and
  19.  * that both the copyright notice and this permission notice appear in
  20.  * supporting documentation.
  21.  *
  22.  * Neither the Institutions (Emory University, Oak Ridge National
  23.  * Laboratory, and University of Tennessee) nor the Authors make any
  24.  * representations about the suitability of this software for any
  25.  * purpose.  This software is provided ``as is'' without express or
  26.  * implied warranty.
  27.  *
  28.  * PVM version 3 was funded in part by the U.S. Department of Energy,
  29.  * the National Science Foundation and the State of Tennessee.
  30.  */
  31.  
  32. /* Dynamic resource code for PVM has been developed by many different
  33.  * groups and people over the last 3 years.
  34.  * Thanks goes to the following:
  35.  *     Technische Universitat Munchen, University of Wisconsin Madison and
  36.  *  the University of Reading UK.
  37.  *
  38.  *    Special thanks to the CoCheck team for being the first to attempt a
  39.  *    real RM (we found almost all the bugs now, thanks)
  40.  *
  41.  *
  42.  */
  43.  
  44. #if     !defined(FALSE)
  45. #define FALSE   0
  46. #endif
  47. #if     !defined(TRUE)
  48. #define TRUE    1
  49. #endif
  50.  
  51.  
  52. #define MAX_MESSAGE     16      /* Make sure this number stays right :) */
  53.  
  54. /* Structure definitions */
  55.  
  56.  
  57. typedef int                     bool;
  58. typedef struct HOST_TYPE        host_type;
  59. typedef struct MESSAGE_TYPE     message_type;
  60. typedef struct TASK_TYPE        task_type;
  61.  
  62. struct HOST_TYPE
  63.   {
  64.         struct pvmhostinfo      entry;
  65.         host_type               *next;
  66.         host_type               *prev;
  67.     int            load;
  68.   };
  69.  
  70. struct MESSAGE_TYPE
  71.   {
  72.         int     msg_tag;
  73.         int     (*code)();
  74.   };
  75.  
  76. struct TASK_TYPE
  77.   {
  78.         struct pvmtaskinfo      entry;
  79.         task_type               *next;
  80.         task_type               *prev;
  81.   };
  82.  
  83. struct notification {
  84.         int             kind;
  85.         int             for_who;
  86.         int             msg_tag;
  87.         int             on_tid;
  88.         int             m_ctx;
  89. } *notifylist;
  90.  
  91.  
  92.  
  93. int             MYTID;
  94. int                 notify_list_size = 0;
  95. int                     num_arches = 0;
  96. int                     num_hosts = 0;
  97. int                 num_notifys = 0;
  98. int                 num_tasks = 0;
  99. int                 task_list_size = 0;
  100. host_type            HOST_HEAD;
  101. task_type              TASK_HEAD;
  102. struct pvmhostinfo      *host;
  103. struct pvmhostinfo     *our_host;
  104. struct pvmhostinfo     *LOCAL_HOST;
  105. extern struct Pvmtracer pvmctrc;
  106. extern int        pvmmyctx;
  107. extern struct Pvmtracer pvmtrc;
  108.  
  109. /*      Function Prototypes         */
  110.  
  111. int     add_host                (   );
  112. int     add_task                (   );
  113. int     delete_host             (   );
  114. int     del_notification        (   );
  115. int     delete_task             (   );
  116. host_type * find_host              (   );
  117. int     free_list             (   );
  118. int     new_notification        (   );
  119. int     pack_host_list          (   );
  120. int     pack_task_list          (   );
  121. int     select_host             (   );
  122. int     send_notification       (   );
  123. int     sm_spawn                (   );
  124. int     sm_exec                 (   );
  125. int     sm_execack              (   );
  126. int     sm_task                 (   );
  127. int     sm_config               (   );
  128. int     sm_addhost              (   );
  129. int     sm_delhost              (   );
  130. int     sm_add                  (   );
  131. int     sm_addack               (   );
  132. int     sm_notify               (   );
  133. int     sm_taskx                (   );
  134. int     sm_hostx                (   );
  135. int     sm_handoff              (   );
  136. int     sm_sched                (   );
  137. int     sm_sthost               (   );
  138. int     sm_sthostack            (   );
  139. int     loop_init               (   );
  140. int     unpack_string             (   );
  141.  
  142.  
  143. message_type Messages[MAX_MESSAGE] =
  144. {
  145.         /*      Message Tag             Message Code */
  146.  
  147.         {       SM_TASK,                sm_task         }, /* 0 */
  148.         {       SM_TASKX,               sm_taskx        },
  149.         {       SM_SPAWN,               sm_spawn        },
  150.         {       SM_EXEC,                sm_exec         },
  151.         {       SM_EXECACK,             sm_execack      },
  152.         {       SM_CONFIG,              sm_config       }, /* 5 */
  153.         {       SM_ADDHOST,             sm_addhost      },
  154.         {       SM_DELHOST,             sm_delhost      },
  155.         {       SM_ADD,                 sm_add          },
  156.         {       SM_ADDACK,              sm_addack       },
  157.         {       SM_NOTIFY,              sm_notify       }, /* 10 */
  158.         {       SM_HOSTX,               sm_hostx        },
  159.         {       SM_HANDOFF,             sm_handoff      },
  160.         {       SM_SCHED,               sm_sched        },
  161.         {       SM_STHOST,              sm_sthost       },
  162.         {       SM_STHOSTACK,           sm_sthostack    }  /* 15 */
  163. };
  164.  
  165.